﻿@model ViewModels.Pwd.ResetModel

<form method="post" action="/api/Pwd/Forget" zyf-pwd-submit>
	<div class="form-group">
		<label asp-for="Password">新密码：（* 必填）</label>
		<input asp-for="Password" class="form-control" placeholder="至少6位字符" />
		<span asp-validation-for="Password" class="text-danger"></span>
	</div>
	<div class="form-group">
		<label asp-for="ConfirmPassword">确认密码：（* 必填）</label>
		<input asp-for="ConfirmPassword" class="form-control" placeholder="确保密码没有错误" />
		<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
	</div>
	<partial name="../Shared/_BySMS">
	<button type="submit" class="btn btn-primary">提交</button>
</form>

@section Scripts{
<script>
	$('[zyf-pwd-submit]').submit(function (event) {
		formSubmit(event, {
			success: function (data) {
				goPrepage();
			},
			failed: function () {
				initCaptcha();
			}
		})
	});

	function checkPhoneNumber(data) {
		if (data) {
			getNumberErrorMessage().text('* 手机号码尚未注册')
				.addClass('field-validation-error')
				.show();
		} else { //后续要检查，不能省略
			getNumberErrorMessage().text('').hide();
		}
	}
</script>
}